#!/usr/bin/perl

use warnings;
use strict;

open (SAMPLE, "sample.file") or die $!;

foreach (<SAMPLE>) {
    print if s/William/Siegfield/;
}

close SAMPLE;
